package com.ccsoft.backuptools.controller;

import com.ccsoft.backuptools.entity.Color;
import com.ccsoft.backuptools.service.ColorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

//@RestController
//@CrossOrigin
//@RequestMapping("/color")
public class ColorController {
    @Autowired
    private ColorService service;

    @PostMapping("/list")
    public List<Color> selectAll(){
        return service.selectAll();
    }

    @PostMapping("/insert")
    public int insert(@RequestBody Color record){
        return service.insert(record);
    }
}
